home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global gCurrLog, gShortReportList, gTotLog, gLogPathList, gRectReport, gAltezzaWind, gBaseWind, gShortFlag, gMaxLines, gSep
- end
-
- on moveWindow
- global gRectReport
- set gRectReport to the rect of the frontWindow
- end
-
- on resizeWindow
- DrawControls()
- end
-
- on zoomWindow
- DrawControls()
- end
-
- on closeWindow
- global gCurrLogText
- set gCurrLogText to VOID
- tell the stage
- do("ChiudiFreccia")
- do("InitMenu")
- do("SetMenuLista")
- end tell
- end
-
- on chiudiWindow
- close(the frontWindow)
- updateStage()
- end
-
- on ScrollByVBar mySprite
- set myBtnUp to the name of member the member of sprite mySprite
- if char 4 to 5 of myBtnUp = "Of" then
- exit
- end if
- set startCondizione to the locV of the clickLoc > (the bottom of sprite(19) - 2)
- set RunCondizione to startCondizione
- repeat while the stillDown and (startCondizione = RunCondizione)
- if RunCondizione then
- NextPageV()
- else
- PrevPageV()
- end if
- set RunCondizione to the locV of the clickLoc > (the bottom of sprite(19) - 2)
- end repeat
- end
-
- on FirstV
- global gCurrLine, gTotLines, gMaxLines, gCurrLogText
- if (gCurrLine > 1) and (gTotLines > 0) then
- set gCurrLine to 1
- set LastLine to gCurrLine + gMaxLines - 1
- ImpostaVThumb()
- updateStage()
- put line gCurrLine to LastLine of gCurrLogText into field "fReport"
- end if
- end
-
- on LastV
- global gCurrLine, gTotLines, gMaxLines, gCurrLogText
- if ((gCurrLine + gMaxLines - 1) < gTotLines) and (gTotLines > 0) then
- set gCurrLine to gTotLines - gMaxLines + 1
- set LastLine to gCurrLine + gMaxLines - 1
- ImpostaVThumb()
- updateStage()
- put line gCurrLine to LastLine of gCurrLogText into field "fReport"
- end if
- end
-
- on NextV
- global gCurrLine, gTotLines, gMaxLines, gCurrLogText
- if ((gCurrLine + gMaxLines - 1) < gTotLines) and (gTotLines > 0) then
- set gCurrLine to gCurrLine + 1
- set LastLine to gCurrLine + gMaxLines - 1
- ImpostaVThumb()
- updateStage()
- put line gCurrLine to LastLine of gCurrLogText into field "fReport"
- end if
- end
-
- on PrevV
- global gCurrLine, gTotLines, gMaxLines, gCurrLogText
- if (gCurrLine > 1) and (gTotLines > 0) then
- set gCurrLine to gCurrLine - 1
- set LastLine to gCurrLine + gMaxLines - 1
- ImpostaVThumb()
- updateStage()
- put line gCurrLine to LastLine of gCurrLogText into field "fReport"
- end if
- end
-
- on NextPageV
- global gCurrLine, gTotLines, gMaxLines, gCurrLogText
- if ((gCurrLine + gMaxLines - 1) < gTotLines) and (gTotLines > 0) then
- set gCurrLine to gCurrLine + gMaxLines
- if (gCurrLine + gMaxLines - 1) > gTotLines then
- set gCurrLine to gTotLines - gMaxLines + 1
- if gCurrLine < 1 then
- set gCurrLine to 1
- end if
- end if
- set LastLine to gCurrLine + gMaxLines - 1
- ImpostaVThumb()
- updateStage()
- put line gCurrLine to LastLine of gCurrLogText into field "fReport"
- end if
- end
-
- on PrevPageV
- global gCurrLine, gTotLines, gMaxLines, gCurrLogText
- if (gCurrLine > 1) and (gTotLines > 0) then
- set gCurrLine to gCurrLine - gMaxLines
- if gCurrLine < 1 then
- set gCurrLine to 1
- end if
- set LastLine to gCurrLine + gMaxLines - 1
- ImpostaVThumb()
- updateStage()
- put line gCurrLine to LastLine of gCurrLogText into field "fReport"
- end if
- end
-
- on ImpostaVThumb
- global gCurrLine, gTotLines, gMaxLines
- if (gCurrLine = 1) or (gCurrLine = 0) then
- set the locV of sprite 19 to the top of sprite 23
- else
- if (gCurrLine + gMaxLines - 1) = gTotLines then
- set the locV of sprite 19 to the bottom of sprite 23
- else
- set dest to (float(the height of sprite 23) / float(gTotLines - gMaxLines) * float(gCurrLine - 1)) + the top of sprite 23
- set the locV of sprite 19 to dest
- end if
- end if
- end
-
- on ScrollByHBar mySprite
- set myBtnUp to the name of member the member of sprite mySprite
- if char 4 to 5 of myBtnUp = "Of" then
- exit
- end if
- set startCondizione to the locH of the clickLoc > (the right of sprite(39) - 2)
- set RunCondizione to startCondizione
- repeat while the stillDown and (startCondizione = RunCondizione)
- if RunCondizione then
- NextH()
- else
- PrevH()
- end if
- set RunCondizione to the locH of the clickLoc > (the right of sprite(39) - 2)
- end repeat
- end
-
- on FirstH
- global gCurrLog, gTotLog
- if (gCurrLog > 1) and (gTotLog > 0) then
- set gCurrLog to 1
- ReadLogText()
- ImpostaHThumb()
- DrawVControls()
- end if
- end
-
- on LastH
- global gCurrLog, gTotLog
- if (gCurrLog < gTotLog) and (gTotLog > 0) then
- set gCurrLog to gTotLog
- ReadLogText()
- ImpostaHThumb()
- DrawVControls()
- end if
- end
-
- on NextH
- global gCurrLog, gTotLog
- if (gCurrLog < gTotLog) and (gTotLog > 0) then
- set gCurrLog to gCurrLog + 1
- ReadLogText()
- ImpostaHThumb()
- DrawVControls()
- end if
- end
-
- on PrevH
- global gCurrLog, gTotLog
- if (gCurrLog > 1) and (gTotLog > 0) then
- set gCurrLog to gCurrLog - 1
- ReadLogText()
- ImpostaHThumb()
- DrawVControls()
- end if
- end
-
- on ImpostaHThumb
- global gCurrLog, gTotLog
- if (gCurrLog = 1) or (gCurrLog = 0) then
- set the locH of sprite 39 to the left of sprite 43
- else
- if gCurrLog = gTotLog then
- set the locH of sprite 39 to the right of sprite 43
- else
- set dest to (float(the width of sprite 43) / float(gTotLog - 1) * float(gCurrLog - 1)) + the left of sprite 43
- set the locH of sprite 39 to dest
- end if
- end if
- end
-
- on DrawVControls
- DrawControlVPrevLog(20)
- DrawControlVBar(16)
- DrawControlVThumb(19)
- DrawControlVNextLog(21)
- updateStage()
- end
-
- on DrawControls
- global gRectReport, gAltezzaWind, gBaseWind, gMaxLines
- set gRectReport to the rect of the frontWindow
- set gAltezzaWind to the bottom of gRectReport - the top of gRectReport
- set gBaseWind to the right of gRectReport - the left of gRectReport
- set the visible of sprite 15 to 0
- set the visible of sprite 16 to 0
- set the visible of sprite 19 to 0
- set the visible of sprite 20 to 0
- set the visible of sprite 21 to 0
- set the visible of sprite 30 to 0
- set the visible of sprite 31 to 0
- set the visible of sprite 35 to 0
- set the visible of sprite 36 to 0
- set the visible of sprite 39 to 0
- set the visible of sprite 40 to 0
- set the visible of sprite 41 to 0
- DrawControlVConstrainBar(23)
- DrawControlHConstrainBar(43)
- updateStage()
- set gMaxLines to (gAltezzaWind - 5 - 15) / the textHeight of member "fReport"
- DrawControlVPrevLog(20)
- DrawControlVBar(16)
- DrawControlVThumb(19)
- DrawControlVNextLog(21)
- DrawControlHPrevLog(40)
- DrawControlHBar(36)
- DrawControlHThumb(39)
- DrawControlHNextLog(41)
- DrawControlText(6)
- updateStage()
- set the visible of sprite 15 to 1
- set the visible of sprite 16 to 1
- set the visible of sprite 19 to 1
- set the visible of sprite 20 to 1
- set the visible of sprite 21 to 1
- set the visible of sprite 30 to 1
- set the visible of sprite 31 to 1
- set the visible of sprite 35 to 1
- set the visible of sprite 36 to 1
- set the visible of sprite 39 to 1
- set the visible of sprite 40 to 1
- set the visible of sprite 41 to 1
- end
-
- on DrawControlVConstrainBar mySprite
- global gAltezzaWind
- set the height of sprite mySprite to gAltezzaWind - 45 - 15
- end
-
- on DrawControlVPrevLog mySprite
- global gTotLines, gMaxLines, gBaseWind
- set the locH of sprite mySprite to gBaseWind - 7
- if gTotLines <= gMaxLines then
- set the member of sprite mySprite to "BtnOfVPrev"
- else
- set the member of sprite mySprite to "BtnUpVPrev"
- end if
- end
-
- on DrawControlVBar mySprite
- global gTotLines, gMaxLines, gBaseWind, gAltezzaWind
- if gTotLines <= gMaxLines then
- set the member of sprite mySprite to "BtnOfVBar"
- set the member of sprite (mySprite - 1) to "BtnOfTopVBar"
- else
- set the member of sprite mySprite to "BtnUpVBar"
- set the member of sprite (mySprite - 1) to "BtnUpTopVBar"
- end if
- set the locH of sprite (mySprite - 1) to gBaseWind - 7
- set the locH of sprite mySprite to gBaseWind - 7
- set the locV of sprite mySprite to the bottom of sprite (mySprite - 1)
- set the height of sprite mySprite to gAltezzaWind - 32 - 15
- end
-
- on DrawControlVThumb mySprite
- global gTotLines, gMaxLines, gBaseWind
- set the locH of sprite mySprite to gBaseWind - 7
- if gTotLines <= gMaxLines then
- set the member of sprite mySprite to "BtnOfVThumb"
- else
- set the member of sprite mySprite to "BtnUpVThumb"
- ImpostaVThumb()
- end if
- end
-
- on DrawControlVNextLog mySprite
- global gTotLines, gMaxLines, gAltezzaWind, gBaseWind
- if gTotLines <= gMaxLines then
- set the member of sprite mySprite to "BtnOfVNext"
- else
- set the member of sprite mySprite to "BtnUpVNext"
- end if
- set the locH of sprite mySprite to gBaseWind - 7
- set the locV of sprite mySprite to 1 + gAltezzaWind - (the height of sprite mySprite / 2) - 15
- end
-
- on DrawControlText mySprite
- global gAltezzaWind, gBaseWind, gCurrLine, gTotLines, gMaxLines, gCurrLogText
- set myMember to the member of sprite mySprite
- set the rect of myMember to rect(0, 0, gBaseWind - 22, gAltezzaWind - 5 - 15)
- set gMaxLines to the pageHeight of member "fReport" / the textHeight of member "fReport"
- if (gCurrLine + gMaxLines - 1) > gTotLines then
- set gCurrLine to gTotLines - gMaxLines + 1
- if gCurrLine < 1 then
- set gCurrLine to 1
- end if
- end if
- set LastLine to gCurrLine + gMaxLines - 1
- ImpostaVThumb()
- put line gCurrLine to LastLine of gCurrLogText into field "fReport"
- end
-
- on DrawControlHConstrainBar mySprite
- global gBaseWind
- set the width of sprite mySprite to gBaseWind - 45 - 15 - 15 - 15
- updateStage()
- end
-
- on DrawControlHPrevLog mySprite
- global gTotLog, gAltezzaWind
- set the locV of sprite mySprite to gAltezzaWind - 7
- set the locV of sprite (mySprite - 10) to gAltezzaWind - 7
- set the locV of sprite (mySprite - 9) to gAltezzaWind - 7
- if gTotLog > 1 then
- set the member of sprite mySprite to "BtnUpHPrev"
- else
- set the member of sprite mySprite to "BtnOfHPrev"
- end if
- end
-
- on DrawControlHBar mySprite
- global gBaseWind, gAltezzaWind, gTotLog
- if gTotLog > 1 then
- set the member of sprite mySprite to "BtnUpHBar"
- set the member of sprite (mySprite - 1) to "BtnUpTopHBar"
- else
- set the member of sprite mySprite to "BtnOfHBar"
- set the member of sprite (mySprite - 1) to "BtnOfTopHBar"
- end if
- set the locV of sprite (mySprite - 1) to gAltezzaWind - 7
- set the locV of sprite mySprite to gAltezzaWind - 7
- set the locH of sprite mySprite to the right of sprite (mySprite - 1)
- set the width of sprite mySprite to gBaseWind - 32 - 15 - 15 - 15
- end
-
- on DrawControlHThumb mySprite
- global gTotLog, gAltezzaWind
- set the locV of sprite mySprite to gAltezzaWind - 7
- if gTotLog > 1 then
- set the member of sprite mySprite to "BtnUpHThumb"
- ImpostaHThumb()
- else
- set the member of sprite mySprite to "BtnOfHThumb"
- end if
- end
-
- on DrawControlHNextLog mySprite
- global gTotLog, gAltezzaWind, gBaseWind
- if gTotLog > 1 then
- set the member of sprite mySprite to "BtnUpHNext"
- else
- set the member of sprite mySprite to "BtnOfHNext"
- end if
- set the locV of sprite mySprite to gAltezzaWind - 7
- set the locH of sprite mySprite to 1 + gBaseWind - (the width of sprite mySprite / 2) - 15
- end
-
- on BtnUp Bottone
- if Bottone <> EMPTY then
- set BottoneUp to "BtnUp" & char 6 to the length of Bottone of Bottone
- return BottoneUp
- end if
- end
-
- on BtnDw BottoneUp
- set BottoneDw to "BtnDw" & char 6 to the length of BottoneUp of BottoneUp
- return BottoneDw
- end
-
- on BtnRL BottoneUp
- set BottoneRL to "BtnRL" & char 6 to the length of BottoneUp of BottoneUp
- return BottoneRL
- end
-
- on BtnOf BottoneUp
- set BottoneOf to "BtnOf" & char 6 to the length of BottoneUp of BottoneUp
- return BottoneOf
- end
-
- on BtnName BottoneUp
- set Bottone to char 6 to the length of BottoneUp of BottoneUp
- return Bottone
- end
-